package com.lph.util;

import net.sourceforge.pinyin4j.PinyinHelper;

public class Ch2PinYin {
	public static String getFirstChpy(String text){
		String py="";
		char cs[]=text.toCharArray();
		for (char c : cs) {
			String []pys=PinyinHelper.toHanyuPinyinStringArray(c);
			if(pys!=null){
				py+=pys[0].charAt(0);
			}else{
				py+=c;
			}
		}
		return py;
		
	}
}
